export function showInfo(msg, icon, duration) {
	try {
		if (!icon)
			icon = 'none';
		uni.showToast({
			position:'center',
			title: msg,
			icon,
			duration: !duration ? 3000 : duration
		})
	} catch (e) {
		console.error(e);
	}
}

export function showWarn(msg, icon) {
	showInfo(msg, icon);
}

export function showError(msg, icon) {
	showInfo(msg, icon);
}

export function showLoading(title = "", mask = true) {
	uni.showLoading({
		title: title,
		mask,
	})
}

export function hideLoading() {
	uni.hideLoading()
}